<?php


function getPictureUrls(){
$i = 0;
$hostname="localhost";
$username="root";
$password="";
$database="db_dinkonst";

//Connnects to database
mysql_connect($hostname,$username,$password);
mysql_select_db($database) or die( "Unable to select database");


$result = mysql_query("select pictureURL from items order by item_id DESC");
 while($row = mysql_fetch_assoc($result)) {

        $pictureURL = $row["pictureURL"];

        $picArray[$i] = $pictureURL;
        ++$i;


     
        }



 return $picArray;

mysql_close();


}

?>